package
{
	import mx.controls.Alert;
	import mx.rpc.http.HTTPService;
	
	public class conexionBD
	{
		//Carpeta donde se almacena la libreria php
		private var servicesPath:String = "services/";
		
		public function conexionBD()
		{
			
		}
		
		public function leerBD(service:HTTPService, SQL:String, Nun:int):void{
			service.url = servicesPath + "select.php?sql=" + escape(SQL) + "&num=" + Nun;
			service.send();
		}
		
		public function operacionBD(service:HTTPService, SQL:String, Nun:int):void{
			service.url = servicesPath + "operacion.php?sql=" + escape(SQL) + "&num=" + Nun;
			service.send();
			//Alert.show(service.url);
		}
		
		public function normalBD(service:HTTPService, SQL:String, Nun:int):void{
			service.url = servicesPath + "normal.php?sql=" + escape(SQL) + "&num=" + Nun;
			service.send();
			//Alert.show(service.url);
		}
	}
}